using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools._Configuration._LRSNetwork
{
    /// <summary>
    /// <para>Configure Lookup Table</para>
    /// <para>Configures a lookup table for one or more fields used in a multifield route ID.</para>
    /// <para>为多字段路由 ID 中使用的一个或多个字段配置查找表。</para>
    /// </summary>    
    [DisplayName("Configure Lookup Table")]
    public class ConfigureLookupTable : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ConfigureLookupTable()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_feature_class">
        /// <para>LRS Network Feature Class</para>
        /// <para>The input LRS Network feature class in which the lookup table will be configured. The network must have a multifield route ID.</para>
        /// <para>将在其中配置查找表的输入 LRS 网络要素类。网络必须具有多字段路由 ID。</para>
        /// </param>
        /// <param name="_lookup_table">
        /// <para>Lookup Table</para>
        /// <para>A table that contains a list of street names and their corresponding GNIS codes. It can be a stand-alone table or reside in an SDE.</para>
        /// <para>包含街道名称及其相应 GNIS 代码列表的表。它可以是独立表，也可以驻留在 SDE 中。</para>
        /// </param>
        /// <param name="_field_applied_to">
        /// <para>Field Applied To</para>
        /// <para>The route ID field in the LRS Network in which the Lookup Table will be configured.</para>
        /// <para>LRS 网络中将在其中配置查找表的路径 ID 字段。</para>
        /// </param>
        /// <param name="_lookup_key">
        /// <para>Lookup Key</para>
        /// <para>The key field in the Lookup Table.</para>
        /// <para>查找表中的键字段。</para>
        /// </param>
        public ConfigureLookupTable(object _in_feature_class, object _lookup_table, object _field_applied_to, object _lookup_key)
        {
            this._in_feature_class = _in_feature_class;
            this._lookup_table = _lookup_table;
            this._field_applied_to = _field_applied_to;
            this._lookup_key = _lookup_key;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Configure Lookup Table";

        public override string CallName => "locref.ConfigureLookupTable";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_feature_class, _lookup_table, _field_applied_to, _lookup_key, _lookup_display, _allow_any_lookup_value.GetGPValue(), _out_feature_class];

        /// <summary>
        /// <para>LRS Network Feature Class</para>
        /// <para>The input LRS Network feature class in which the lookup table will be configured. The network must have a multifield route ID.</para>
        /// <para>将在其中配置查找表的输入 LRS 网络要素类。网络必须具有多字段路由 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("LRS Network Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_feature_class { get; set; }


        /// <summary>
        /// <para>Lookup Table</para>
        /// <para>A table that contains a list of street names and their corresponding GNIS codes. It can be a stand-alone table or reside in an SDE.</para>
        /// <para>包含街道名称及其相应 GNIS 代码列表的表。它可以是独立表，也可以驻留在 SDE 中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Lookup Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _lookup_table { get; set; }


        /// <summary>
        /// <para>Field Applied To</para>
        /// <para>The route ID field in the LRS Network in which the Lookup Table will be configured.</para>
        /// <para>LRS 网络中将在其中配置查找表的路径 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Applied To")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _field_applied_to { get; set; }


        /// <summary>
        /// <para>Lookup Key</para>
        /// <para>The key field in the Lookup Table.</para>
        /// <para>查找表中的键字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Lookup Key")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _lookup_key { get; set; }


        /// <summary>
        /// <para>Lookup Display</para>
        /// <para>The Lookup Table description field. This field appears in the text box for the multifield route ID.</para>
        /// <para>“查找表描述”字段。此字段显示在多字段路由 ID 的文本框中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Lookup Display")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _lookup_display { get; set; } = null;


        /// <summary>
        /// <para>Allow any lookup value</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a value that is not in the lookup table can be added. The Lookup Display parameter cannot be configured when this option is checked.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Allow a value to be configured when one is not present in the table.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Don't allow a lookup display value to be configured. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否可以添加不在查找表中的值。选中此选项时，无法配置查找显示参数。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 允许在表中不存在值时配置值。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不允许配置查找显示值。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Allow any lookup value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _allow_any_lookup_value_value _allow_any_lookup_value { get; set; } = _allow_any_lookup_value_value._false;

        public enum _allow_any_lookup_value_value
        {
            /// <summary>
            /// <para>DO_NOT_ALLOW_ANY_VALUE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_ALLOW_ANY_VALUE")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>ALLOW_ANY_VALUE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ALLOW_ANY_VALUE")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Output Network Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public ConfigureLookupTable SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}